<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page pageEncoding="UTF-8"%>
<fmt:setLocale value="ja-JP" />

<script type="text/javascript">
$(function(){setListControl("ul.itemListS li");});
</script>

<div class="list">
<c:if test="${! isMobile }">
	<div style="width:310px; height:270px; float:right; background-color:white; margin-right: 10px;"></div>
</c:if>
	<ul class="itemListS">
	<c:forEach var="review" items="${reviewList}" varStatus="status">
		<c:if test="${isMobile && status.index == 15}">
	<%="</ul>" %>
	<div style="width:320px; height:50px; margin:0 auto 1em;">
		<script type="text/javascript"><!--
		google_ad_client = "ca-pub-2855357403949640";
		/* for Mobile */
		google_ad_slot = "7833433879";
		google_ad_width = 320;
		google_ad_height = 50;
		//-->
		</script>
		<script type="text/javascript"
		src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
		</script>
	</div>
	<%="<ul class=\"itemListS\">" %>
		</c:if>
		<li class="${review.productGroup}">
			<c:if test="${! empty review.swatchImageUrl}">
				<img src="${review.swatchImageUrl}"/>
			</c:if>
			<c:if test="${! empty year}">
			</c:if>
			<span class="icon"><c:if test="${! empty year}">${status.count + beginRange}</c:if></span>
			<a href="/review/${review.itemId}">${review.reviewTitle}
			</a><br/>
			<span><fmt:formatDate value="${review.reviewDate}" pattern="yyyy/MM/dd" timeZone="JST"/>
			<span class="star"><span class="star${review.numberOfStars}"></span></span>(${review.score}点) 
			</span>
		</li>
	</c:forEach>
	</ul>
	
	<c:if test="${maxPage > 1}">
		<nav class="page_nav">
			<ul>
				<c:if test="${currentPage != 1}">
					<li>
						<a href="${context}/${currentPage - 1}">&lt;前へ</a>
					</li>
				</c:if>
				<c:forEach varStatus="status" begin="1" end="${maxPage}">
					<c:if test="${status.count == currentPage}">
						<li class="current">${status.count}</li>
					</c:if>
					<c:if test="${status.count != currentPage}">
						<li><a href="${context}/${status.count}">${status.count}</a></li>
					</c:if>
				</c:forEach>
				<c:if test="${currentPage != maxPage}">
					<li>
						<a href="${context}/${currentPage + 1}">次へ&gt;</a>
					</li>
				</c:if>
			</ul>
	</nav>
	</c:if>
<c:if test="${! isMobile}">
	<div style="width:300px; position:absolute; right:10px; top:0;">
		<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
		<!-- 300x250, IT Penguin -->
		<ins class="adsbygoogle"
		     style="display:inline-block;width:300px;height:250px"
		     data-ad-client="ca-pub-2855357403949640"
		     data-ad-slot="9162065787"></ins>
		<script>
		(adsbygoogle = window.adsbygoogle || []).push({});
		</script>
	</div>
	</c:if>
</div>
<c:if test="${! isMobile }">
<div style="text-align:center; margin:1.5em 0 1.5em;">
<script type="text/javascript"><!--
amazon_ad_tag = "hiroatsu-22"; amazon_ad_width = "600"; amazon_ad_height = "520"; amazon_ad_link_target = "new"; amazon_ad_discount = "remove";//--></script>
<script type="text/javascript" src="http://www.assoc-amazon.jp/s/ads.js"></script>
</div>
</c:if>